// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/font/numbers.css'
import moment from 'moment'
require('@/lib/shuiyin.js')
// 设置 js中可以访问 $cdn
import { $cdn } from '@/config'
Vue.prototype.$cdn = $cdn
import Vant from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant)
// 引入全局样式
import '@/assets/css/index.scss'
import '@/assets/style/global.scss'
// 移动端适配
import 'lib-flexible/flexible.js'
import '@/assets/style/vant-reset.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

Vue.config.productionTip = false
router.afterEach((to) => {
  // 设置页面标题为路由的 meta.title 或者默认标题
  document.title = to.meta.title || '智能助手';
});
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
